package com.neusoft.databus.policy.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.neusoft.databus.policy.enums.EventStatus;
import com.neusoft.databus.policy.model.Event;

public interface EventRepository extends JpaRepository<Event, Long>, CustomizedEventRepository {

    List<Event> findByStatus(EventStatus eventStatus);

    List<Event> findByResourceCode(String resourceCode);

    List<Event> findByPolicyId(Long policyId);

    List<Event> findByCodeAndStatus(String code, EventStatus status);

    List<Event> findByResourceCodeAndStatus(String code, EventStatus status);

    List<Event> findByPolicyIdAndStatus(Long policyId, EventStatus status);
}
